﻿// <copyright file="Album.cs" company="Microsoft Corporation">
// Copyright (c) 2009 Microsoft Corporation All Rights Reserved
// </copyright>
// <author>Michael S. Scherotter</author>
// <email>mischero@microsoft.com</email>
// <date>2008-09-23</date>
// <summary>The Silverlight Application</summary>

namespace MyOpenSpace
{
    using System.Diagnostics.CodeAnalysis;
    using System.Windows.Browser;

    /// <summary>
    /// MySpace Album
    /// </summary>
    public class Album
    {
        /// <summary>
        /// Album script object
        /// </summary>
        private ScriptObject album;

        /// <summary>
        /// Initializes a new instance of the Album class.
        /// </summary>
        /// <param name="album">album script object</param>
        internal Album(ScriptObject album)
        {
            this.album = album;
        }

        /// <summary>
        /// Returns the field specified by the key
        /// </summary>
        /// <param name="key">the key for the field</param>
        /// <returns>the field value</returns>
        [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", 
            MessageId = "get", Justification = "Mirroring OpenSocial API.")]
        public object getField(string key)
        {
            return this.album.Invoke("getField", key);
        }
    }
}
